import java.util.Scanner;

/**
 * Created by dllo on 18/3/31.
 */
// 比较三个数的最大最小
public class Test04 {
    public static void main(String[] args) {
        while (true) {
            Scanner scanner = new Scanner(System.in);
            System.out.println("输入第一个数:");
            int a = scanner.nextInt();
            System.out.println("输入第二个数");
            int b = scanner.nextInt();
            System.out.println("输入第三个数:");
            int c = scanner.nextInt();
            int max = a;
            max = max > b ? max : b;
            max = max > c ? max : c;
            System.out.println("最大值是:" + max);
            int min = a;
            min = min < b ? min : b;
            min = min < c ? min : c;
            System.out.println("最小值是:" + min);
        }
    }
}